From b70b67679f4a98d2457db5c52c783ebe1d61f6fd Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Tue, 6 Sep 2005 15:47:23 +0000 Subject: [PATCH] Enable xenstored optimisations. Signed-off-by: Keir Fraser --- tools/xenstore/Makefile | 2 +- tools/xenstore/xenstored_core.c | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile index 13164f08d6..82c64dfc6f 100644 --- a/tools/xenstore/Makefile +++ b/tools/xenstore/Makefile @@ -12,7 +12,7 @@ BASECFLAGS=-Wall -W -g -Werror # Make gcc generate dependencies. BASECFLAGS += -Wp,-MD,.$(@F).d PROG_DEP = .*.d -#BASECFLAGS+= -O3 $(PROFILE) +BASECFLAGS+= -O3 $(PROFILE) #BASECFLAGS+= -I$(XEN_ROOT)/tools BASECFLAGS+= -I$(XEN_ROOT)/tools/libxc BASECFLAGS+= -I$(XEN_ROOT)/xen/include/public diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c index 10c9f5db33..ea78747d2a 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -1304,8 +1304,12 @@ static int out_of_mem(void *data) static void consider_message(struct connection *conn) { - struct buffered_data *in = NULL; - enum xsd_sockmsg_type type = conn->in->hdr.msg.type; + /* + * 'volatile' qualifier prevents register allocation which fixes: + * warning: variable 'xxx' might be clobbered by 'longjmp' or 'vfork' + */ + struct buffered_data *volatile in = NULL; + enum xsd_sockmsg_type volatile type = conn->in->hdr.msg.type; jmp_buf talloc_fail; assert(conn->state == OK); @@ -1443,7 +1447,11 @@ static void unblock_connections(void) struct connection *new_connection(connwritefn_t *write, connreadfn_t *read) { - struct connection *new; + /* + * 'volatile' qualifier prevents register allocation which fixes: + * warning: variable 'xxx' might be clobbered by 'longjmp' or 'vfork' + */ + struct connection *volatile new; jmp_buf talloc_fail; new = talloc(talloc_autofree_context(), struct connection); -- 2.30.2